const os = require('os');
//Linux系统bai上duzhi'Linux'
//macOS 系统上'Darwin'
//Windows系统上'Windows_NT'
let sysType = os.type();
console.log(sysType)
if (sysType === "Windows_NT") {  //windows

} else { //mac 和 linux

} 